import request from '@/utils/http'

// const url = "/api3";

const url = "/api/repo";

// 查询东海所有基金列表
export async function queryFundBasicInfoList(params?: any): Promise<any>{
  return request(`${url}/fundBasicInfo/list`,{
    method: 'POST',
    data: params
  })
}

// 产品周报折线图
export async function getReportRate(params?: any): Promise<any>{
  return request(`${url}/portfolio_rep_info/establishRepoRate`,{
    method: 'POST',
    data: params
  })
}
// 区间正回购
export async function intervalPositiveRepo(params?: any): Promise<any> {
  return request(`${url}/portfolio_rep_info/intervalPositiveRepo`, {
    method: "POST",
    data: params,
  });
}

// 区间交易对手统计
export async function counterparty(params?: any): Promise<any> {
    return request(`${url}/portfolio_rep_info/counterparty`, {
      method: "POST",
      data: params,
    });
  }

  // 区间交易员统计
export async function trader(params?: any): Promise<any> {
    return request(`${url}/portfolio_rep_info/trader`, {
      method: "POST",
      data: params,
    });
  }
// 导出接口
export async function export_portfolio_rep_info(params?: any): Promise<any>{
  return request(`${url}/portfolio_rep_info/export`,{
    method: 'POST',
    data: params,
    responseType: 'blob',
  })
}
// 获取数据更新时间

export async function get_last_job_time(params?: any): Promise<any>{
  return request(`${url}/last_job_time/get`,{
    method: 'POST',
    data: params
  })
}

// 获取业绩信息
export async function getPerformanceInformation(params?: any): Promise<any>{
  return request(`${url}/portfolio_rep_info/performanceInformation`,{
    method: 'POST',
    data: params
  })
}

// 查询回购信息-分页
export async function findAll(params?: any): Promise<any>{
  return request(`${url}/portfolio_rep_info/findAll`,{
    method: 'POST',
    data: params
  })
}
